package com.xlinur.moviegrabber;

public class GrabberFactory {

	private static final GrabberFactory INSTANCE = new GrabberFactory(); 
	
	private GrabberFactory() {}

	public static GrabberFactory getInstance() {
		return INSTANCE; 
	}
	
	public Grabber getGrabber(String name) {
		if ("kinopoisk.ru".equals(name)) {
			//produce kinopoisk
			return new GrabberKinopoisk();
		} else if ("imdb.com".equals(name)) {
			//produce imdb
			return new GrabberImdb();
		} else {
			return null;
		}
	} 
}